u32 eax, ebx, ecx, edx;
int index_msb, tmp;
int cpu = smp_processor_id();
- extern int opt_nosmp;
if (!cpu_has(c, X86_FEATURE_HT) || cpu_has(c, X86_FEATURE_CMP_LEGACY))
return;
- if (opt_nosmp) {
- smp_num_siblings = 1;
- } else {
- cpuid(1, &eax, &ebx, &ecx, &edx);
- smp_num_siblings = (ebx & 0xff0000) >> 16;
- }
+ cpuid(1, &eax, &ebx, &ecx, &edx);
+ smp_num_siblings = (ebx & 0xff0000) >> 16;
if (smp_num_siblings == 1) {
printk(KERN_INFO "CPU: Hyper-Threading is disabled\n");
#endif
/* opt_nosmp: If true, secondary processors are ignored. */
-int opt_nosmp = 0;
+static int opt_nosmp = 0;
boolean_param("nosmp", opt_nosmp);
/* maxcpus: maximum number of CPUs to activate. */
set_in_cr4(X86_CR4_OSXMMEXCPT);
if ( opt_nosmp )
+ {
max_cpus = 0;
+ smp_num_siblings = 1;
+ boot_cpu_data.x86_num_cores = 1;
+ }
+
smp_prepare_cpus(max_cpus);
/* We aren't hotplug-capable yet. */
atomic_set(&d->refcnt, 1);
atomic_set(&v->pausecnt, 0);
- d->domain_id = dom_id;
- v->processor = cpu;
+ d->domain_id = dom_id;
+ v->processor = cpu;
spin_lock_init(&d->big_lock);